import os, sys
import pygame
if not pygame.font: print "Fonts not Found"

if not pygame.mixer: print "Mixer/sound not Found"

pygame.init()
background = pygame.display.set_mode((800,600), 0, 0)
pygame.display.set_caption("Window",)
pygame.time.Clock()
Xpos = 2
Xpos_me = 2
Ypos = 0
Ypos_me = 0
char = pygame.image.load("char.png")
char = char.convert()
charRect = char.get_rect()
anim = 0


while 1:
    background.blit(char, charRect)
    pygame.display.update()

    
    #if pygame.event.get() == pygame.K_LEFT:
    for anim in range(100):
        #if Xpos_me < 799:
        
            charRect = charRect.move(Xpos, Ypos)
            background.blit(char, charRect)
            pygame.display.update()
            pygame.time.delay(10)
            Xpos_me += 2
            print Xpos_me

        #if Xpos_me > 799:

        #    charRect.move(-Xpos_me,0)
            
    

    





